﻿CREATE TABLE [dbo].[t_Document] (
    [ID]          INT              IDENTITY (1, 1) NOT NULL,
    [GUID_Table]  UNIQUEIDENTIFIER NOT NULL,
    [Name]        NVARCHAR (264)   NOT NULL,
    [Body]        IMAGE            NOT NULL,
    [Note]        NVARCHAR (4000)  NULL,
    [UserName]    VARCHAR (32)     NOT NULL,
    [Date]        SMALLDATETIME    NOT NULL,
    [Extention]   AS               (CONVERT([varchar](16),[dbo].[clr_RegEx_MatchGroup]([Name],'[.](.+)$',(1)),(0))) PERSISTED,
    [ContentType] VARCHAR (32)     NOT NULL
);

